Process Suggestion Parameter Macro (Custom Operators)

Synopsis

This operator can be used to define a macro which can be used by %{macro_name} in parameter values of succeeding operators of the current process. The value will be a suggestion dropdown which can be filled via a process when clicking on the refresh button. This is useful for process-defined custom operators.

Description

This operator can be used to define a macro which can be used in parameter values of succeeding operators of the current process. Once the macro has been defined, the value of that macro can be used as parameter values in coming operators by writing the macro name in %{macro_name} format in the parameter value where 'macro_name' is the name of the macro specified when the macro was defined. The macro name is specified by the macro parameter and the macro value is the value selected from the dropdown for value parameter. The values for the dropdown are filled when clicking the refresh button. The macro will be replaced in the value strings of parameters by the macro's value. This operator can also be used to re-define an existing macro.

The refresh button runs the process defined by the extension name and suggestion process advanced parameters. This process must have been added to the custom extension via the Repository folder in the Create Custom Extension dialog. As result, the process must have a table with one column with nominal or text values. The values of this column become the updated suggestion values.

The refresh button process gets the current parameter values of the custom operator as macros. The macro names are the parameter key prefixed by 'parameter_', e.g. the parameter 'my param' results in the macro 'parameter_my_param' with the value of parameter as value. This can be used to create custom parameters that depend on each other.

The purpose of this operator is mainly to assist in creating process-defined custom operators. When selecting the value parameter of this operator for the custom operator, the custom operator will have a suggestion dropdown that is filled by the process when clicking the refresh button.

This operator sets the value of a macro irrespective of any ExampleSet. That is why this operator can also exist on its own i.e. without being connected to any other operator. If you want to create a single macro from properties of a given input ExampleSet, the Extract Macro operator is the right operator.

Macros

A macro can be considered as a value that can be used by all operators of the current process that come after the macro has been defined. Whenever using macros, make sure that the operators are in the correct sequence. It is compulsory that the macro should be defined before it can be used in parameter values. The macro is one of the advanced topics, please study the Example Process of the Set Macro operator to develop a better understanding of macros. The Example Processes of the Extract Macro operator are also useful for understanding the concepts related to the macros.

There are also some predefined macros:

  • %{process_name}: will be replaced by the name of the process (without path and extension)
  • %{process_file}: will be replaced by the file name of the process (with extension)
  • %{process_path}: will be replaced by the complete absolute path of the process file
  • Several other short macros also exist, e.g. %{a} for the number of times the current operator was applied.

Please note that other operators like many of the loop operators (e.g. Loop Values , Loop Attributes) also add specific macros.

During the runtime the defined macros can be observed in the macro viewer.

Differentiation

Set Macro

The Process Suggestion Parameter Macro operator is like the Set Macro operator with only one difference. The Set Macro operator can be used for setting arbitrary String values while the Process Suggestion Parameter Macro operator has a dropdown of suggested values that are filled by a process.

Input

  • through (Data table)

    It is not compulsory to connect any object with this port. Any object connected at this port is delivered without any modifications to the output port. This operator can have multiple inputs. When one input is connected, another through input port becomes available which is ready to accept another input (if any). The order of inputs remains the same. The object supplied at the first through input port of this operator is available at the first through output port.

Output

  • through (Data table)

    Objects that were given as input are passed without changing to the output through this port. It is not compulsory to attach this port to any other port, the macro value is set even if this port is left without connections. This operator can have multiple outputs. When one output is connected, another through output port becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The object delivered at the first through input port of this operator is delivered at the first through output port

Parameters

  • extension name The name of the custom extension from which to retrieve the process.
  • suggestion process The name of the process which should be executed when the refresh button of the value parameter is clicked. It must have been stored previously in the custom extension and return one column of suggestion values.
  • use available input If this is selected, the input of the (custom) operator with the suggestion dropdown is given to the suggestion process as input. When the process has not been run at least until the operator there will be nothing available at the ports except for connections for which the connection data is extracted from the metadata.
  • macroThis parameter is used to specify the name of the macro. The macro can be accessed in succeeding operators of the current process by writing the macro's name in %{macro_name} format, where 'macro_name' is the name of the macro specified in this parameter.
  • valueThis parameter is used to specify the value of the macro. Click the refresh button to fill the list of suggestions for the value. When the macro is accessed in succeeding operators of the current process by writing the macro's name in %{macro_name} format, it is replaced by the value of the macro specified by this parameter.